import { axios } from '@/utils/request'

const api = {
  shopAdd: '/shop/shop-add',
  shopList: '/shop/shop-list',
  shopEdit: '/shop/shop-edit',
  shopDel: '/shop/shop-del',
  shopAudit: '/shop/shop-audit',
  shopCashList: '/shop/shop-cash-list',
  shopCashEdit: '/share/apply',
  clerkAdd: '/shop/clerk-add',
  clerkList: '/shop/clerk-list',
  clerkEdit: '/shop/clerk-edit',
  clerkDel: '/shop/clerk-del',
  shopSettingList: '/shop/shop-setting-list',
  shopSettingEdit: '/shop/shop-setting-edit',
  getCityList: '/shop/get-city-list'
}

export default api

export function shopSettingList (parameter) {
  return axios({
    url: api.shopSettingList,
    method: 'get',
    params: parameter
  })
}
export function shopSettingEdit (parameter) {
  return axios({
    url: api.shopSettingEdit,
    method: 'post',
    data: parameter
  })
}
export function clerkAdd (parameter) {
  return axios({
    url: api.clerkAdd,
    method: 'post',
    data: parameter
  })
}
export function clerkList (parameter) {
  return axios({
    url: api.clerkList,
    method: 'get',
    params: parameter
  })
}
export function clerkEdit (parameter) {
  return axios({
    url: api.clerkEdit,
    method: 'post',
    data: parameter
  })
}
export function clerkDel (parameter) {
  return axios({
    url: api.clerkDel,
    method: 'get',
    params: parameter
  })
}

export function shopCashEdit (parameter) {
  return axios({
    url: api.shopCashEdit,
    method: 'post',
    data: parameter
  })
}

export function shopCashList (parameter) {
  return axios({
    url: api.shopCashList,
    method: 'get',
    params: parameter
  })
}

export function shopAudit (parameter) {
  return axios({
    url: api.shopAudit,
    method: 'post',
    data: parameter
  })
}
export function shopAdd (parameter) {
  return axios({
    url: api.shopAdd,
    method: 'post',
    data: parameter
  })
}
export function shopList (parameter) {
  return axios({
    url: api.shopList,
    method: 'get',
    params: parameter
  })
}
export function shopEdit (parameter) {
  return axios({
    url: api.shopEdit,
    method: 'post',
    data: parameter
  })
}
export function shopDel (parameter) {
  return axios({
    url: api.shopDel,
    method: 'get',
    params: parameter
  })
}
export function getCityList (parameter) {
  return axios({
    url: api.getCityList,
    method: 'get',
    params: parameter
  })
}
